import request from '../utils/request';

/**
 * 获取帖子列表
 * @param params
 */
export const selectPost = () => {
    return request.get('/stick/post/select')
}

/**
 * 浏览量缓存
 * @param params
 */
export const getViewIncr = (postId: number) => {
    return request.get<any>('/stick/post/postViewIncr', { params: { postId } })
}

/**
 * 通过id获取帖子详情
 * @param params
 */
export const forumUserSelect = (postId: number) => {
    return request.get<any>('/stick/post/forumUserSelect', { params: { postId } })
}

/**
 * 通过用户id获取帖子
 * @param params
 */
export const postByUserId = (userId: number) => {
    return request.get<any>('/stick/post/postByUserId', { params: { userId } })
}